﻿using MengLin.OOP.DesignPattern.BridgePattern.MultiPlatformMFormatLog.Implements.Log;
using MengLin.OOP.DesignPattern.BridgePattern.MultiPlatformMFormatLog.Implements.Platform;
using MengLin.OOP.DesignPattern.BridgePattern.MultiPlatformMFormatLog.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.BridgePattern.MultiPlatformMFormatLog
{
    class Program
    {
        static void Main(string[] args)
        {
            //.Net平台下的Database Log
            {
                AbstractLog abstractLog = new DatabaseLog();
                abstractLog.IPlatform = new DotnetPlatform();
                abstractLog.Write("123456");
            }
            //Java平台下的TextFile Log
            {
                AbstractLog abstractLog = new TextFileLog();
                abstractLog.IPlatform = new JavaPlatform();
                abstractLog.Write("678910");
            }
            Console.Read();
        }
    }
}
